#include<bits/stdc++.h>

using namespace std;

int n,mo[100010],ans,cnt;
bool use[100010],die[100010];

int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin >> n;
    for(int i=1;i<=n;i++)
    {
        cin >> mo[i];
    }
    ans=n;
    cnt=n-1;
    sort(mo+1,mo+n+1);
    use[1]=1;
    for(int i=2;i<=n;i++)
    {
        for(int j=i-1;j>0;j--)
        {
            if(cnt<=0)
            {
                cout << ans;
                return 0;
            }
            if(use[i]==1)
                break;
            bool flag=0;
            if(die[j]==0 && mo[i]>mo[j])
            {
                if(die[j-1]=0 && mo[j-1]==mo[j])
                {
                    for(int k=j-1;mo[k]==mo[j];k--)
                    {
                        if(use[k]=1)
                        {
                            die[k]=1;
                            use[i]=1;
                            cnt--;
                            ans--;
                            flag=1;
                            //cout << ans << " " << cnt << " " << i << " " << k << endl;
                            break;
                        }
                    }
                }
                if(flag==1)
                    break;

                else
                {
                    die[j]=1;
                    use[i]=1;
                    ans--;
                    cnt--;
                }
                //cout << ans << " " << cnt << " " << i <<"  "<< j << endl << "-----------------------------------" << endl;


            }
        }
    }
    cout << ans;
    return 0;
}
